home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / Games / orbitrax.swf / scripts / DefineSprite_1013 / frame_1 / PlaceObject2_409_9 / CLIPACTIONRECORD onClipEvent(load).as
Text File  |  2010-11-09  |  802b  |  29 lines

  1. onClipEvent(load){
  2.    gameMain.addObjIfHit(this,"hitZone","hitArray");
  3.    gameMain.hitArray.push(this);
  4.    gameMain.finishLine = this;
  5.    hitFct = function()
  6.    {
  7.       for(var _loc1_ in gameMain.hitArray)
  8.       {
  9.          gameMain.hitArray[_loc1_].hitAction = gameMain.hitArray[_loc1_].hitFct;
  10.       }
  11.       if(gameMain.tcount == 3)
  12.       {
  13.          gameMain.tcount = 0;
  14.          gameMain.turn = gameMain.turn + 1;
  15.          gameMain.bumpSnd.gotoAndPlay("newTurn");
  16.          if(gameMain.turn >= gameMain.turnTotal)
  17.          {
  18.             main.stopGame("user");
  19.          }
  20.       }
  21.       hitAction = undefined;
  22.    };
  23.    if(gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth())
  24.    {
  25.       gameMain.elementMap.swapDepths(gameMain.swapObj);
  26.    }
  27.    hitAction = hitFct;
  28. }
  29.